<% if @post.valid? %>
  $("#post-list").prepend("<%=j render :partial => "post", :locals => { :post => @post } %>");
  $("#post_content").val("");
<% else %>
  alert("post failed")
<% end %>
